package com.jalarbee.liquid.services.service.impl;

import com.jalarbee.core.generic.dao.GenericDao;
import com.jalarbee.core.generic.service.impl.GenericServiceImpl;
import com.jalarbee.liquid.services.business.Service;
import com.jalarbee.liquid.services.dao.ServiceDao;
import com.jalarbee.liquid.services.service.ServiceService;
import com.jalarbee.stock.category.business.Category;
import java.util.List;
import javax.inject.Named;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.transaction.annotation.Transactional;

/**
 *
 * @author Abdoul
 */

@Named(value = "serviceService")
@Transactional(readOnly = true)
public class ServiceServiceImpl extends GenericServiceImpl<Service, Integer> implements ServiceService {

    
    @Autowired
    protected void setDao(@Qualifier(value = "serviceDao") GenericDao<Service, Integer> dao) {
        this.dao = dao;
    }

    public List<Service> getServicesForCategory(Category category) {
        return ((ServiceDao)dao).getServicesByCategory(category);
    }

}
